package com.hrg.gys.clfr.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.Arrays;

public class MainActivity extends AppCompatActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        final ImageView imageView = (ImageView) findViewById(R.id.iv);
        findViewById(R.id.sample_text).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Bitmap bitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();
                Bitmap bitmap2 = JniData.doBitmap(bitmap);
                imageView.setImageBitmap(bitmap2);
            }
        });
        findViewById(R.id.sample_text2).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                JniData.syncThread2();
            }
        });
    }

    private void log(String string) {
        Log.i("native ", string);
    }
}
